Skip to content

Conversation

@vietj
Copy link
Member

@vietj vietj commented Oct 28, 2024

Motivation:

The new interceptors for changing request/response head each do a separate change yet they only modify the request/response head.

We should instead have a single interceptor that can implement all of them a batch the modification of the head in a single interceptor.

The builder pattern can be used to build such interceptor with the desired modification of the developer

Changes:

A new HeadInterceptor with a builder that aggregates the existing head individual interceptors.

@vietj vietj linked an issue Oct 28, 2024 that may be closed by this pull request
@vietj vietj added this to the 5.0.0 milestone Oct 28, 2024
@vietj vietj requested a review from tsegismont October 28, 2024 07:55
@tsegismont tsegismont self-assigned this Nov 7, 2024
Copy link
Member

@tsegismont tsegismont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vietj , great PR

A couple of comments/concerns

vietj and others added 2 commits November 13, 2024 10:18
Motivation:

The new interceptors for changing request/response head each do a separate change yet they only modify the request/response head.

We should instead have a single interceptor that can implement all of them a batch the modification of the head in a single interceptor.

The builder pattern can be used to build such interceptor with the desired modification of the developer

Changes:

A new HeadInterceptor with a builder that aggregates the existing head individual interceptors.
The builder configuration methods can be invoked several times.

Signed-off-by: Thomas Segismont <[email protected]>
@tsegismont
Copy link
Member

@vietj I've updated PR, can you please take a look? Thank you

- Can be invoked several times
- Operations are invoked in the order of configuration

Signed-off-by: Thomas Segismont <[email protected]>
@tsegismont
Copy link
Member

@vietj PTAL

Copy link
Member Author

@vietj vietj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tsegismont tsegismont merged commit 5e44cae into main Nov 19, 2024
4 checks passed
@tsegismont tsegismont deleted the head-interceptor branch November 19, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unified head interception

3 participants